CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

PROJECT("OV_calib")
set(BUILD_TYPE RelWithDebInfo)
add_definitions(-std=c++11)

FIND_PACKAGE(OpenCV REQUIRED)
INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIRS})


MESSAGE(STATUS "OpenCV Include: " ${OpenCV_INCLUDE_DIRS})
LINK_DIRECTORIES(${OpenCV_LIBRARY_DIRS})
MESSAGE(STATUS "OpenCV Library: " ${OpenCV_LIBRARY_DIRS})
ADD_DEFINITIONS(${OpenCV_DEFINITIONS})
find_package(Qt4 REQUIRED )
include( ${QT_USE_FILE} )
add_definitions( ${QT_DEFINITIONS} )
include_directories( ${CMAKE_BINARY_DIR} )

ADD_EXECUTABLE(img_calib src/cali.cpp)
target_link_libraries(img_calib ${OpenCV_LIBS})


ADD_EXECUTABLE(calib_xml src/calib_xml.cpp)
target_link_libraries(calib_xml ${OpenCV_LIBS})

ADD_EXECUTABLE(calibInPath src/calibInPath.cpp)
target_link_libraries(calibInPath ${OpenCV_LIBS})

ADD_EXECUTABLE(calib2 src/cali_2.cpp)
target_link_libraries(calib2 ${OpenCV_LIBS})


ADD_EXECUTABLE(testLoadIm test/test_ImgLoad.cpp)
target_link_libraries(testLoadIm ${OpenCV_LIBS})

add_subdirectory(ui/calib)